package com.glls.account.service.impl;

import com.glls.account.mapper.AccountMapper;
import com.glls.account.service.AccountService;
import com.glls.common.vo.OrderVo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * TODO
 *
 * @author junyang
 * @version 1.0.0
 * @date 2025/2/24 11:24
 */
@Service
public class AccountServiceImpl implements AccountService {
    @Resource
    private AccountMapper accountMapper;
    @Override
    //@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
    public int updateAccount(OrderVo order) {
        return accountMapper.updateAccount(order);
    }
}
